<!--
- Author:  LiShibin.
- Date:    2017/11/1 0001.
- File:    baidu.
-->
<template>
  <div>
    <iframe id="iframe1" style="width: 100%; height: 26rem" :src="url" frameborder="0" @load="fixIosIframeWidthBug"></iframe>
    <footer-tab></footer-tab>
  </div>
</template>

<script>
  export default{
    data() {
      return {
        url: this.$route.query.url
      }
    },
    components: {},
    created() {
      // this.$native.weixinShare(window.location.href)
    },
    methods: {
      fixIosIframeWidthBug() { // ios iframe 宽度会撑开bug
        try {
          if (!navigator.userAgent.match(/iPad|iPhone/i)) {
            return false
          }
          var iframebody = document.getElementById('iframe1').contentWindow.document.body
          iframebody.style.width = document.body.clientWidth + 'px'
        } catch (e) {
        }
      }
    }
  }
</script>

<style>

</style>